<template>
  <div class="container">
    <div class="container-title">
      数据查询
    </div>
    <div class="nav">
      <div v-for="(item,index) in list" :key="item.name" class="box" @click="toLink(item.link)">
        <div class="box-cell">
          <img :src="`/svg/home-${index+1}.svg`" alt="">
          <div>
            {{ item.name }}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import { navList } from './data'
import {useRouter} from 'vue-router'

const router = useRouter()
const list = ref<any>(navList)
const toLink = (link: string) => {
  router.push(link)
}

</script>

<style lang="less" scoped>
@import "./index.less";
</style>
